/*
 * @authors :Bin Mei
 * @date    :2017-05-22
 * @description：react-redux-chat  -> 仿微信聊天工具
 */
import {USER_INIT,SET_DATA} from "../../actions/User/index";

let initStates = {
	user:{}
};
let sessions= [];
function userIndex(state = initStates,action){
	switch(action.type){

	
		case USER_INIT:
			//缓存内取数据
			
			return Object.assign({},state,{user:action.data});
		case SET_DATA:
			return Object.assign({},state,{
				user:{...state.user,...action.data}

			});
		
		default:
			return state;
	};
};

export default userIndex;


